﻿using System;
using UnityEngine;

// Token: 0x0200017B RID: 379
public class ClickBreake : MonoBehaviour
{
	// Token: 0x060009CB RID: 2507 RVA: 0x00039764 File Offset: 0x00037964
	private void Start()
	{
		this.rigids = base.GetComponentsInChildren<Rigidbody>();
	}

	// Token: 0x060009CC RID: 2508 RVA: 0x00039774 File Offset: 0x00037974
	private void Update()
	{
		if (Input.GetMouseButtonDown(0))
		{
			if (this.explosionTrans == null)
			{
				this.explosionTrans = base.transform;
			}
			for (int i = 0; i < this.rigids.Length; i++)
			{
				this.rigids[i].isKinematic = false;
				this.rigids[i].AddExplosionForce(this.explosionForce, this.explosionTrans.position, this.explosionRadius);
			}
		}
	}

	// Token: 0x040009C1 RID: 2497
	private Rigidbody[] rigids;

	// Token: 0x040009C2 RID: 2498
	[SerializeField]
	private Transform explosionTrans;

	// Token: 0x040009C3 RID: 2499
	[SerializeField]
	private float explosionForce = 1f;

	// Token: 0x040009C4 RID: 2500
	[SerializeField]
	private float explosionRadius = 1f;
}
